Skip to content

fix(github): normalize hostnames before credential lookup and API routing - #1069

Merged
mldangelo-oai merged 9 commits into
openai:mainfrom
dipeshbabu:fix/github-host-case
Oct 17, 2026
Merged

mldangelo-oai merged 9 commits into
openai:mainfrom
dipeshbabu:fix/github-host-case

Conversation

@dipeshbabu

@dipeshbabu dipeshbabu commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A mixed-case GitHub.com hostname could select Enterprise Server REST and GraphQL paths. Normalize the hostname before credential lookup and endpoint selection so casing does not change the selected GitHub platform.

Changes

  • Merge the latest main into the contributor branch, preserving its history and existing Enterprise Cloud routing.
  • Normalize the hostname once and simplify the API base URL selection.
  • Consolidate duplicate endpoint tests into a REST/GraphQL matrix covering GitHub.com, Enterprise Cloud with data residency, and Enterprise Server, including explicit ports.
  • Add a synthetic gh child-process regression test for the hostname used in credential lookup.

Testing

  • Reproduced incorrect mixed-case GitHub.com REST/GraphQL paths on main; verified the corrected paths. The credential regression also fails when hostname normalization is removed.
  • Focused GitHub/import/discovery tests: 58 passed, 3 platform skips in both fixed and randomized order.
  • Full SDK suite: 4,904 passed, 65 skipped, zero failures in both fixed and randomized order on the final head.
  • Full SDK types, formatting, plugin build, and build:ci passed.
  • Three fresh independent source reviews and separate verification found no actionable issues on the final commit.

Risk and rollout

Compatible bug fix with no new commands, flags, or settings. Existing platform endpoints, token protections, and cancellation behavior are preserved. Endpoint tests use the real Octokit client with synthetic credentials and injected transport; live Enterprise instances were not exercised.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@github-actions github-actions Bot added the bug Something isn't working label Sep 27, 2026
@mldangelo-oai mldangelo-oai changed the title fix(github): normalize host casing before selecting the API fix(github): select endpoints for each GitHub platform Oct 5, 2026
@mldangelo-oai mldangelo-oai added area:integrations SDK/API surfaces, MCP integrations, hooks, and external application connections. and removed area:integrations SDK/API surfaces, MCP integrations, hooks, and external application connections. labels Oct 8, 2026

@alandelong-oai alandelong-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 320b70b with three independent source-review passes and synthesis. No P0/P1 findings were confirmed. Twenty-seven focused GitHub endpoint tests passed in the completed review. Live GitHub Enterprise and full cross-platform integration remain unvalidated.

@mldangelo-oai mldangelo-oai changed the title fix(github): select endpoints for each GitHub platform fix(github): normalize hostnames before credential lookup and API routing Oct 17, 2026

@mldangelo-oai mldangelo-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry it took us so long to get to this, and thank you for the contribution! Good catch on the hostname casing. I merged in main, kept the endpoint logic small, and tightened the tests around REST, GraphQL, and the hostname passed to gh auth token. Local checks and cross-platform CI are green. Happy to get this in!

@mldangelo-oai
mldangelo-oai merged commit 05ff204 into openai:main Oct 17, 2026
88 of 116 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 19, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants